
// 和网络交互相关的参数
let params = {
  //物流单
  package: {
    id: '',
    orderId: '',
    serialNumber: '',
    method: '',
    waybill: '',
    deliveryCompany: '',
    packageBoxList:[],
  },
  packageBox: {
    id: '',
    orderId: '',
    packageId: '',
    name: '',
    subWaybill: '',
    type: '1',
    size: '',
    weight: '',
  },
  product:{

  },
  addProduct:{
    boxId:'',
    colorItemIds:[],
  }
};
//页面状态相关
let data = {
  packageList:[],
  productList:[],
  productListFilter:[],
  packageBoxList:[],//待分配包裹箱
  productSupplyList:[],
  modifyBoxCount:{
    id:'',
    boxName:'',
    color:'',
    sizeName:'',
    boxCount:0,
    maxCount:0
  }
};
let status = {
  //发货
  modalPackage: {
    isShow: false,
    title: "创建物流单",
    isLoading: true,
    type:1,//1 新增 2编辑
  },
  modalPackageBox: {
    isShow: false,
    title: "创建实体箱包",
    isLoading: true,
    type:1,//1 新增 2编辑
  },
  modalProductAdd: {
    isShow: false,
    isLoading: true,
  },
  modalBatchProductAdd: {
    isShow: false,
    isLoading: true,
  },
  modalBoxCountModify: {
    isShow: false,
    isLoading: true,
  },
  //查看图片
  modalImage: {
    isShow: false,
    url: ''
  },
  modalRecord: {
    title: "",
    info:{
      productCode:"",
      productColor:"",
      productSize:""
    },
    recordType: 0, //记录类型。1：订单；2：包裹；3：订单项
    isShow: false,
  },
  packageRules: {
    // waybill: [
    //   {required: true, message: '运单号不能为空', trigger: 'blur'}
    // ],
    deliveryCompany: [
      {required: true, message: '请选择快递公司', trigger: 'change'}
    ],
  },
  packageBoxRules: {
    name: [
      {required: true, message: '箱包名称不能为空', trigger: 'blur'}
    ],
    // size: [
    //   {required: true, message: '包装尺寸不能为空', trigger: 'blur'}
    // ],
    // weight: [
    //   {required: true,type: 'integer', message: '包装重量不能为空', trigger: 'blur'}
    // ],
    // packageId: [
    //   {required: true, message: '请选择物流包裹', trigger: 'change'}
    // ],
  },
  productRules: {
    boxId: [
      {required: true, message: '请选择包裹', trigger: 'change'}
    ],
  },
  modalTracking:{
    isShow:false,
    title: "跟踪包裹",
    isLoading: true,
    info:[]
  },
  modalDiscount:{
    isShow:false,
    title:"订单折扣明细"
  },
  modalConfirmOrderShow : false,
  modalSubRefund:{ //拆分缺货产品
    isShow:false,
    refundReadonly:false
  },
  modalRefundItems:{ //退款
    isShow:false
  },
  modalPaymentRecordShow:false,//订单款项记录,
  modalSupply:{ //产品货源弹出框
    isShow:false
  },
  modalRefusePayment:{ //设置用户拒付弹出框
    isShow:false
  },
};

export default  {
  tData: data,
  tStatus:status,
  tParams: params,
};
